﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Text;

namespace Cartoons.Books.Model
{
    public partial class Book
    {
        public string AuthorsBibliographyString
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("    ");
                if (this.Authors != null)
                    for (int i = 0; i < this.Authors.Count; i++)
                    {
                        sb.Append(Authors[i].Name);
                        if (i < this.Authors.Count - 1)
                            sb.Append(", ");
                    }
                return sb.ToString();
            }
        }

        public string FullBibliographyDescriptionString
        {
            get
            {
                return string.Format("    {0}: {1}; {2}, {3}. - {4}", this.BookName, this.DocType.DocTypeName, this.Publisher, this.PublicationYear, this.Size);
            }
        }
    }
}
